package com.panda.exception;

import com.panda.enums.AppHttpCodeEnum;

/**
 * @Author: panda
 * @Date: 2022-05-18 16:04
 * @Description: 重写全局异常 copy
 */

public class SystemException extends RuntimeException{

    private int code;

    private String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public SystemException(AppHttpCodeEnum httpCodeEnum) {
        super(httpCodeEnum.getMsg());
        this.code = httpCodeEnum.getCode();
        this.msg = httpCodeEnum.getMsg();
    }
    
}

